package com.lagou.test;

import com.lagou.config.SpringConfig;
import com.lagou.service.AccountService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration({"classpath:applicationContext.xml"}) 这是xml形式 不用喽
@ContextConfiguration(classes = SpringConfig.class) //我们用注解的形式喽
public class AccountServiceImplTest2 {

    @Autowired
    private AccountService accountService;

    @Test
    public void testTransfer(){

        accountService.transfer();
    }
}
